Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent redirects to /undefined after saml auth #669

Conversation

tecoholic
Copy link
Member

When a user authenticates using SAML, but their accounts aren't linked, they land on the login page with the message to link their accounts. If the
OC_REDIRECT_ON_TPA_UNLINKED_ACCOUNT value is not setup, they end up getting redirected to /undefined. This commit validates the redirectURL as a valid string before performing the redirect.

Internal-ref: https://tasks.opencraft.com/browse/BB-9010

When a user authenticates using SAML, but their accounts
aren't linked, they land on the login page with the
message to link their accounts. If the
OC_REDIRECT_ON_TPA_UNLINKED_ACCOUNT value is not setup,
they end up getting redirected to /undefined. This commit
validates the redirectURL as a valid string before
performing the redirect.

Internal-ref: https://tasks.opencraft.com/browse/BB-9010
@tecoholic tecoholic self-assigned this Aug 9, 2024
@tecoholic tecoholic requested a review from Agrendalath August 9, 2024 04:37
Copy link
Member

@Agrendalath Agrendalath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

  • I tested this: tested that the undefined redirect no longer happens when the variable is not defined
  • I read through the code
  • I checked for accessibility issues: n/a
  • Includes documentation: n/a
  • Added to the Code Drift project board (for backports)

@Agrendalath Agrendalath merged commit 9ade4ea into opencraft-release/palm.1 Aug 13, 2024
41 checks passed
@Agrendalath Agrendalath deleted the tecoholic/BB-9010-prevent-redirects-to-undefined-after-saml-auth branch August 13, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants